package map.android.baidu.carpool.data.impl;


import android.content.Context;
import map.android.baidu.carpool.WebConfig;
import map.android.baidu.carpool.data.CarpoolBaseData;
import map.android.baidu.carpool.response.HomePageBaseInfoResponse;
import map.android.baidu.carpool.setting.UserInfoSetting;

import java.util.HashMap;
import java.util.Map;

/**
 * Created by zhangtongyu on 15/3/23.
 * 首页请求request baseinfo接口
 */
public class HomePageBaseInfoData extends CarpoolBaseData<HomePageBaseInfoResponse> {

    private String bduss = "";
    private String cityCode;

    public HomePageBaseInfoData(Context context){
        super(context);
    }

    public void setBduss(String bduss) {
        this.bduss = bduss;
    }

    @Override
    protected String getUrl() {
        return WebConfig.getUrl(WebConfig.URL_ID_BASE_INFO) + super.getUrl();
    }

    @Override
    protected Map<String, String> getParams() {
        HashMap<String, String> params = new HashMap<String, String>();
        params.put("bduss", UserInfoSetting.getBduss());
        params.put("cityCode", UserInfoSetting.getCityId());
        return params;
    }
}
